import { CheckBoxSvg, CheckedBoxSvg } from "@/app/assets/CustomizeSvg";
import { UtilHelpers } from "@/service/general/utils/utilHelpers";
import { ReactNode } from "react";

interface CheckInfo {
    status: boolean,
    icon: ReactNode
}

const CheckSvgs: CheckInfo[] = [{
    status: false,
    icon: <CheckBoxSvg width={`100%`} height={`100%`} />
},{
    status: true,
    icon: <CheckedBoxSvg width={`100%`} height={`100%`} />
}]

const getActiveCheckItem = (value: boolean) => {
    return CheckSvgs.find((item) => UtilHelpers.boolsEqual([item.status, value]));
}

export type {
    CheckInfo
}

export {
    getActiveCheckItem
}